package com.qf.feign;

import com.qf.pojo.Goods;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @FeignClient:指定远程调用的客户端
 * @version v1.0.0
 * @Description:
 * @author: 姜红凯
 * @date: 2022.03.14
 * @since 1.0
 */
@FeignClient(value = "QF-GOODS")
public interface GoodsFeign {

    @RequestMapping("/query/{id}")
    public String query(@PathVariable("id") Integer id);

    @RequestMapping("/goods/findById")
    public String findById(@RequestParam("id") Integer id);

    @RequestMapping("/goods/{id}")
    public String findDetails(@PathVariable("id") Integer id);

    @PostMapping("/goods/save")
    public String save(@RequestBody Goods goods);

}
